package org.honeyweb.gsoc.dao;

import java.util.ArrayList;

import org.honeyweb.gsoc.model.Organizations;
import org.honeyweb.gsoc.model.Users;

public interface OrganizationsDao {
	
    /**
     * Return an Organizations object from a given user.
     * @param OrganizationId : int organizationsId
     * @return the corresponding Organizations object.
     * @throws DataAccessException in case of Data access errors 
     * (database unreachable, etc.)
     */
    public Organizations getOrganization(Users user);
    
    /**
     * Return an Organizations object from a given adminId.
     * @param OrganizationId : int organizationsId
     * @return the corresponding Organizations object.
     * @throws DataAccessException in case of Data access errors 
     * (database unreachable, etc.)
     */
    public Organizations getOrganizationByAdminId(int adminId);
    
    /**
     * Return the full list of Organizations .
     * @return the corresponding List of Organizations object.
     * @throws DataAccessException in case of Data access errors 
     * (database unreachable, etc.)
     */
    public ArrayList<Organizations> getListOrganizations();
    
    /**
     * persist an Organizations object from a form.
     * @param name : String name
     * @param adminId : Integer adminId
     * @return the corresponding Organizations object.
     * @throws DataAccessException in case of Data access errors 
     * (database unreachable, etc.)
     */
    public void addOrganization(Organizations organization);
    
    /**
     * update an HoneypotsId value of an organization
     * @param int : organizationId
     * @param int : honeypotsId
     * @return the corresponding Organizations object.
     * @throws DataAccessException in case of Data access errors 
     * (database unreachable, etc.)
     */
    public void addOrganizationsHoneypotsId(int organizationId, int honeypotsId);
    
    /**
     * update an HoneypotsId value of an organization
     * @param int : organizationId
     * @param int : honeypotsId
     * @return the corresponding Organizations object.
     * @throws DataAccessException in case of Data access errors 
     * (database unreachable, etc.)
     */
    public void delOrganizationsHoneypotsId(int organizationId, int honeypotsId);

}
